package com.zr.model;
// Generated 2016-6-19 19:35:13 by Hibernate Tools 3.2.2.GA

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TGoodstype generated by hbm2java
 */
@Entity
@Table(name = "t_goodstype", catalog = "ld_sys")
public class TGoodstype implements java.io.Serializable {

	private Integer gtid;
	private String gtname;
	private Set<TGood> TGoods = new HashSet<TGood>();

	public TGoodstype() {
	}

	public TGoodstype(String gtname, Set<TGood> TGoods) {
		this.gtname = gtname;
		this.TGoods = TGoods;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "gtid", unique = true, nullable = false)
	public Integer getGtid() {
		return this.gtid;
	}

	public void setGtid(Integer gtid) {
		this.gtid = gtid;
	}

	@Column(name = "gtname")
	public String getGtname() {
		return this.gtname;
	}

	public void setGtname(String gtname) {
		this.gtname = gtname;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TGoodstype")
	public Set<TGood> getTGoods() {
		return this.TGoods;
	}

	public void setTGoods(Set<TGood> TGoods) {
		this.TGoods = TGoods;
	}

}
